package com.cmc.cloud.cmclink.doc.api.document.req.si;

import com.cmc.cloud.cmclink.doc.api.document.req.AttachmentUpdateReqDto;
import com.cmc.cloud.cmclink.doc.api.document.req.RequirementsUpdateReqDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 提单拆单 子提单信息
 *
 * @author 周贤
 * @date 2025/8/27
 */
@Schema(description = "管理后台 - 提单拆合 子提单信息")
@Data
@EqualsAndHashCode()
@ToString(callSuper = true)
public class BlnoSpiltChildDto {

    @Schema(description = "提单主表id")
    private Long blnoId;

    @Schema(description = "提单号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String blNo;

    @Schema(description = "提单拆并单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String splitCombineType;

    @Schema(description = "订舱船名")
    private String bkgVesselCode;

    @Schema(description = "订舱航次")
    private String bkgVoyage;

    @Schema(description = "始发港提单状态")
    private String siStatus;

    @Schema(description = "接货地")
    private String porCode;

    @Schema(description = "装货港")
    private String polCode;

    @Schema(description = "卸货港")
    private String podCode;

    @Schema(description = "目的地")
    private String delCode;

    @Schema(description = "接货地名称")
    private String porDesc;

    @Schema(description = "装货港名称")
    private String polDesc;

    @Schema(description = "卸货港名称")
    private String podDesc;

    @Schema(description = "目的地名称")
    private String delDesc;

    @Schema(description = "箱主代码")
    private String cntrOwner;

    @Schema(description = "箱状态")
    private String cntrStatus;

    @Schema(description = "订舱人代码")
    private String bkpCode;

    @Schema(description = "舱位代码")
    private String spaceOwner;

    @Schema(description = "协议号")
    private String agreementNo;

    @Schema(description = "实际签单类型")
    private String signType;

    @Schema(description = "申请签单类型 ", example = "B")
    private String signOrder;

    @Schema(description = "签发小船提单")
    private Boolean issueFeederBl;

    @Schema(description = "提单类型")
    private String blType;

    @Schema(description = "提单打印份数", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer printBlNumber;

    @Schema(description = "si通知邮箱 （收，可多）")
    private String siNotifyEmails;

    @Schema(description = "路径id")
    private Long routeId;

    @Schema(description = "D/O状态")
    private String doStatus;

    @Schema(description = "拆分的箱信息")
    @NotNull(message = "{BlnoSpiltChildVO.cntrSpiltChild.NotNull}")
    private List<BlnoCntrUpdateReqDto> cntrSpiltChild;

    @Schema(description = "拆分的收发通信息")
    @NotNull(message = "{BlnoSpiltChildVO.scnSpiltChild.NotNull}")
    private List<BlnoScnUpdateReqDto> scnSpiltChild;

    @Schema(description = "拆分的支付信息")
    @NotNull(message = "{BlnoSpiltChildVO.paymentSpiltChild.NotNull}")
    private List<BlnoPaymentUpdateReqDto> paymentSpiltChild;

    @Schema(description = "拆分单附件信息")
    private List<AttachmentUpdateReqDto> attachmentsSpiltChild;

    @Schema(description = "拆分单附加要求信息")
    private List<RequirementsUpdateReqDto> requirementsSpiltChild;

    @Schema(description = "拆分单航线船期信息")
    private List<BlnoVslvoyUpdateReqDto> vslvoySpiltChild;

    @Schema(description = "货物信息")
    @NotNull(message = "{BlnoSpiltChildVO.blnoCargoUpdateReqVO.notnull}")
    private BlnoCargoUpdateReqDto cargoChild;

}
